const mongoose = require('mongoose')

mongoose.connect("mongodb://tcxhl:bREe3DZisDdprB5k@8.130.116.134:27017/tcxhl?authSource=tcxhl")

const conn = mongoose.connection

conn.on("open",()=>{
     console.log("数据库连接成功")
})

conn.on("error",(err)=>{
    console.log("数据库连接失败，失败的原因是",err)

})

module.exports = mongoose